const { defineConfig } = require("@vue/cli-service");
const path = require("path");
module.exports = defineConfig({
  publicPath: "./", // 打包后文件在index.html 中路径的引用前缀
  transpileDependencies: true,
  chainWebpack: (config) => {
    // alias 别名 写路径减少相对路径的出现
    config.resolve.alias
      .set("@", path.resolve(__dirname, "./src"))
      .set("@views", path.resolve(__dirname, "./src/views"))
      .set("@styles", path.resolve(__dirname, "./src/styles"))
      .set("@components", path.resolve(__dirname, "./src/components"))
      .set("@utils", path.resolve(__dirname, "./src/utils"));
  },
  devServer: {
    proxy: {
      "^/fcj": {
        target: "http://www.lrfc.vip:1798",
        changeOrigin: true,
      },
    },
  },
});
